<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<style type="text/css">
li{list-style:none;}
</style>
<body>
	<ul>
		<li class="JD1">家用电器</li>
		<li class="JD2">手机/运营商/数码</li>
		<li class="JD3">电脑/办公</li>
		<li class="JD4">家居/家具/家装/厨具</li>
		<li class="JD5">男装/女装/童装/内衣</li>
		<li class="JD6">美妆/个人清洁/宠物</li>
		<li class="JD7">女鞋/箱包/钟表/珠宝</li>
		<li class="JD8">男鞋/运动/户外</li>
		<li class="JD9">厨房/汽车/汽车用品</li>
		<li class="JD10">母婴/玩具乐器</li>
		<li class="JD11">食品/酒类/生鲜/特产</li>
		<li class="JD12">艺术/礼品鲜花/绿植</li>
		<li class="JD13">医药保健/及申请去</li>
		<li class="JD14">图书/文娱/教育/电子书</li>
		<li class="JD15">机票/酒店/旅游/生活</li>
		<li class="JD16">理财/众筹/白条/保险</li>
		<li class="JD17">安装/维修/清洗/二手</li>
		<li class="JD18">工业品</li>
	</ul>

</body>
<script type="text/javascript">
/*
1、将字符串改成驼峰式命名，如font-size转成fontSize
2、对象格式数组排序,按age升序和降序
var objData=[{name:"A",age:18},{name:"B",age:21},{name:"C",age:19}]
3、打印不含字符串“案例”的title和对应page
var result=[{title:"js数组经典笔试题",page:101},{title:"常用的js动画案例分析",page:50},{title:"jQuery 1.9.4源码分析"}]
4、随机生成1-100的数组，并对数组进行排序，结果为
[1,3,5,7,...99,100,98,96,....2]
左边奇数升序，右边偶数降序
5、实现京东首页商品分类一二级导航切换（无需链接，数据保持一致）
 */
//1.
var str = 'border-left-color';
var arr = str.split('-');
        var subArr = [];
        for (var i = 1; i < arr.length; i++) {
            // console.log(arr[i].substring(1));
            subArr.push(arr[i].charAt(0).toUpperCase() + arr[i].substring(1));
        }
        console.log(arr[0]+subArr.join(''));
//2.
var objData=[{name:"A",age:18},{name:"B",age:21},{name:"C",age:19}],
	arr=[];
for (var i = 0; i < objData.length; i++) {
	arr.push(objData[i].age);
}
console.log(arr.sort());
//3.

var str="案例";
var result=[{title:"js数组经典笔试题",page:101},{title:"常用的js动画案例分析",page:50},{title:"jQuery 1.9.4源码分析"}];
for (var i = 0; i < result.length; i++) {
	for (var j = 0; j < result[i].title.length; j++) {
		if(result[i].title[j]+result[i].title[j+1]==str){
			result.splice(i,1);
			console.log(result);
		}
	}
}

//4.
var arr=[],arr1=[],arr2=[],arr3=[];
//var num = Math.floor(Math.random()*100);
for (var i = 0+1; i < 100+1; i++) {
	arr.push(i);
}
for (var i = 0; i < arr.length; i++) {
if (arr[i]%2==1) {
	arr1.push(arr[i]);
}else{
	arr2.push(arr[i])
}
}
arr2.sort(function(a,b){
	return b-a;
});
//arr1.concat(arr2);
console.log(arr1.concat(arr2))
//5.
var lis=document.querySelectorAll("li");
console.log(lis)




</script>
</html>